// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** addTrainingRule POST /api/trainingRule/add */
export async function addTrainingRuleUsingPost(
  body: API.TrainingRuleAddRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseLong_>('/api/trainingRule/add', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** dayNewlyAddedTrainingRule POST /api/trainingRule/day/newly/added */
export async function dayNewlyAddedTrainingRuleUsingPost(options?: { [key: string]: any }) {
  return request<API.BaseResponseListDataGroupByDateDTO_>('/api/trainingRule/day/newly/added', {
    method: 'POST',
    ...(options || {}),
  });
}

/** deleteTrainingRule POST /api/trainingRule/delete */
export async function deleteTrainingRuleUsingPost(
  body: API.DeleteRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingRule/delete', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** editTrainingRule POST /api/trainingRule/edit */
export async function editTrainingRuleUsingPost(
  body: API.TrainingRuleEditRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingRule/edit', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** getTrainingRuleVOById GET /api/trainingRule/get/vo */
export async function getTrainingRuleVoByIdUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getTrainingRuleVOByIdUsingGETParams,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseTrainingRuleVO_>('/api/trainingRule/get/vo', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** listTrainingRuleVOByIds POST /api/trainingRule/list/ids/vo */
export async function listTrainingRuleVoByIdsUsingPost(
  body: API.TrainingRuleIdListRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseListTrainingRuleVO_>('/api/trainingRule/list/ids/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listTrainingRuleByPage POST /api/trainingRule/list/page */
export async function listTrainingRuleByPageUsingPost(
  body: API.TrainingRuleQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingRule_>('/api/trainingRule/list/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listTrainingRuleVOByPage POST /api/trainingRule/list/page/vo */
export async function listTrainingRuleVoByPageUsingPost(
  body: API.TrainingRuleQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingRuleVO_>('/api/trainingRule/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** listMyTrainingRuleVOByPage POST /api/trainingRule/my/list/page/vo */
export async function listMyTrainingRuleVoByPageUsingPost(
  body: API.TrainingRuleQueryRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponsePageTrainingRuleVO_>('/api/trainingRule/my/list/page/vo', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}

/** updateTrainingRule POST /api/trainingRule/update */
export async function updateTrainingRuleUsingPost(
  body: API.TrainingRuleUpdateRequest,
  options?: { [key: string]: any },
) {
  return request<API.BaseResponseBoolean_>('/api/trainingRule/update', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
